package com.aq.appserver.server.account.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.aq.appserver.server.account.entity.HeadImg;

public interface HeadImgDao extends CrudRepository<HeadImg, Long> {

	@Modifying
	@Query("update HeadImg s set s.url = ?1, s.type = ?3 where s.phoneNumber = ?2")
	void updateHeadImg(String url, String phoneNumber, String type);

	List<HeadImg> findByPhoneNumber(String phoneNum);
}
